package sanglh.edu.hsphysics.utils;

import sanglh.edu.hsphysics.BuildConfig;
import android.util.Log;

public class Logging {
	// ===============================================================================================================

	private static boolean SHOULD_LOG = BuildConfig.DEBUG;
	private static String TAG = "Cloudpager";

	private Logging() {
	}

	// ===============================================================================================================

	public static void print(Class<?> clazz, String msg) {
		if (SHOULD_LOG) {
			Log.e(TAG + "[" + clazz.getName() + "]", msg);
		}
	}

	public static void print(String tag, String msg) {
		if (SHOULD_LOG) {
			Log.e(tag, msg);
		}
	}

	public static void print(String msg) {
		if (SHOULD_LOG) {
			Log.e(TAG, msg);
		}
	}

	public static void print(Throwable ex) {
		if (SHOULD_LOG) {
			ex.printStackTrace();
		}
	}

	// ===============================================================================================================
}